package thread.lock;

import thread.ThreadUtils;

public class ExitTest {
    public  volatile static boolean flag = true;
    public static void main(String[] args) {

        new Thread(()->{
            while (flag){
                System.out.println("t1");

            }

        }).start();
        ThreadUtils.sleep(1);
        flag=false;

    }
}
